package com.woniuxy.controller;


import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.naming.ldap.Control;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.annotation.Annotation;

public class MyFirstController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.setCharacterEncoding("utf-8");
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        ModelAndView modelAndView=new ModelAndView();
        /*modelAndView.addObject("msg","锄禾日当午");
        modelAndView.setViewName("/index.jsp");*/
        modelAndView.addObject("username",username);
        modelAndView.addObject("passwoed",password);
        modelAndView.setViewName("WEB-INF/jsp/success.jsp");
        return modelAndView;
    }
}
